package pta.test10.成绩录入时的及格与不及格人数统计;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws ScoreException {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int AccessNum = 0;
        int NotAccessNum = 0;
        for (int i = 0; i < n; i++) {
            int score = scanner.nextInt();
            try {
                if (score < 0 || score > 100) {
                    i--;
                    throw new ScoreException(score);
                }
                if (score >= 60) AccessNum++;
                else NotAccessNum++;
            } catch (ScoreException e) {
                System.out.println(e.toString());
            }
        }
        System.out.println(AccessNum);
        System.out.println(NotAccessNum);
        scanner.close();
    }

}

class ScoreException extends Exception {
    private int score;

    public ScoreException(int s) {
        this.score = s;
    }

    public String toString() {
        return score + "invalid!";

    }
}